﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AMoveGroundCheck : MonoBehaviour
{
    void Start()
    {

    }

    void Update()
    {

    }

    private void OnCollisionEnter2D(Collision2D collision)
    {
        string layerName = LayerMask.LayerToName(collision.gameObject.layer);
        if ("跳台".Equals(layerName))
        {
            GameObject parent = gameObject.transform.parent.gameObject;
            if (parent != null)
            {
                parent.SendMessage("GoAshore", null);
            }
        }
    }
}
